#ifndef __CAPTUREIMG_H__
#define __CAPTUREIMG_H__

// Include necessary libraries
#include "gmsi.h"
#include "at32f421_bsp.h"

// The configuration structure for the captureimg object.
typedef struct{
    // stepmotor speed
    uint8_t chSpeedSet;
    // 
}captureimg_cfg_t;

// The structure for the captureimg object.
typedef struct{
    gmsi_base_t *ptBase;
    uint8_t chSpeedFlag;
    uint8_t chStepMotorFlag[3];
    uint8_t chInclusiveTimeFlag[3];
    uint8_t chTriggerFlag[8];

    uint8_t chRunTimeCount;             // repeat time
    uint16_t hwStepMotorRunCount;
    uint8_t chExposureTimeCount;
    uint8_t chCaptureWaitCount;
    
    uint8_t chExposureDelay[2];
    uint8_t chExposureDelayCount;
    uint8_t chWaitReaptcount;
    
    uint16_t hwStepMotorRunAloneCount[3];
    uint8_t chStepMotorMaxTime;             // stepmotor max run time
}captureimg_t;

// Function prototypes
int captureimg_Init(uintptr_t wObjectAddr, uintptr_t wObjectCfgAddr);

#endif // __CAPTUREIMG_H__